'''
Created on 19/04/2012

@author: glenn
'''

class ConverterError(Exception):
    def __init__(self, msg, cause=None):
        """@param msg: the message to show the user
        @param cause: optional, if reraising this is the caught exception
        """ 
        Exception.__init__(self, msg)
        self.cause = cause
        
    def __str__(self):
        if self.cause is not None:
            return super(Exception, self).__str__() + " : " + str(self.cause)
        else:
            return super(Exception, self).__str__() 
